import { createRouter,createWebHashHistory } from "vue-router";
const router = createRouter({
    history:createWebHashHistory(),
    routes:[
        // 路由重定向
        {path:'/',redirect:'/login'},
        {path:'/login',component:() => import('./components/Login.vue')},
        {
            path:'/home',component:() => import('./components/Home.vue'),
            redirect:'/home/users',
            children:[
                {path:'users',component:()=> import('./components/subComponents/Users.vue')},
                {path:'goods',component:()=> import('./components/subComponents/Goods.vue')},
                {path:'orders',component:()=> import('./components/subComponents/Order.vue')},
                {path:'rights',component:()=> import('./components/subComponents/Rights.vue')},
                {path:'settings',component:()=> import('./components/subComponents/Settings.vue')},
            ]
        },
    ]
})
export default router